<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p5_浮动布局</title>
</head>
<style>
    .fu {
        background-color: #ff0;
        overflow: hidden;
        /*给父元素加 BFC 结界
           根据浮动的实际高度来填充高度
        */
    }
    .fu>div {
        width: 100px;
        height: 100px;
        border:3px solid #000;
    }
    .z1 {
        float: left;
        background-color: #f00;
    }
    .z2 {
        float:left;
        background-color: #0f0;
    }
    .z3 {
        float:left;
        background-color: #00f;
    }
</style>
<body>
    <div class="fu">
        <div class="z1"></div>
        <div class="z2"></div>
        <div class="z3"></div>
    </div>
</body>
</html>